<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="#{webContext.skin0Culomns}"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="center">
        #{secureUserShow.initUser(param["p1"])}
        <h:form id="testForm">
            <p:breadCrumb>  
                <p:menuitem value="#{ml.tr('Home')}" url="#{webContext.baseUrl}" />  
                <p:menuitem value="#{ml.tr('User list')}" url="#{lm.ml('secure/user/list.xhtml')}" />  
                <p:menuitem value="#{ml.tr('User detail')}" url="#" />  
            </p:breadCrumb>  
            <h:commandButton image="#{webContext.skinUrl}images/pdf.png" 
                             title="#{ml.tr('Download')}">
                <p:fileDownload value="#{secureUserShow.file}" />
            </h:commandButton>
            <h:outputLink id="lnk" value="#" title="#{ml.tr('Print')}">
                <p:printer target="userPanel" />
                <p:graphicImage value="#{webContext.skinUrl}images/print.png" /> 
            </h:outputLink>

            <p:tabView>  
                <p:tab title="#{ml.tr('Info')}">  
                    <p:panel id="userPanel"
                             header="#{secureUserShow.user.firstname} #{secureUserShow.user.lastname}" 
                             >
                        <h:panelGrid id="confirmation" columns="6" cellspacing="10">
                            <h:outputText value="#{ml.tr('Name')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.firstname}" />

                            <h:outputText value="#{ml.tr('Surname')}: " />
                            <h:outputText  styleClass="outputLabel"
                                           value="#{secureUserShow.user.lastname}"/>

                            <h:outputText value="#{ml.tr('Street')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.street}" />

                            <h:outputText value="#{ml.tr('ZIP')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.postalCode}" />

                            <h:outputText value="#{ml.tr('City')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.city}" />

                            <h:outputText value="#{ml.tr('Email')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.email}" />

                            <h:outputText value="#{ml.tr('Phone')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.phone}"/>

                            <h:outputText value="#{ml.tr('Additional information')}: " />
                            <h:outputText styleClass="outputLabel"
                                          value="#{secureUserShow.user.info}" />

                            <h:outputText />
                            <h:outputText />
                        </h:panelGrid>
                    </p:panel>
                </p:tab>
                <p:tab title="#{ml.tr('Permissions')}" >
                    <p:dataList value="#{secureUserShow.user.secureGroupCollection}" var="groupUser" >
                        #{groupUser.name}
                    </p:dataList>
                </p:tab>
            </p:tabView>
        </h:form>

    </ui:define>

</ui:composition>
